When synchronising a first shaft connected to an electric machine with a second shaft, there can be very high load upon the synchronisation mechanism due to the inertia of the electric motor. This is especially a problem when the electrical machine is connected to the first shaft over a gear step, which increases a torque from the electric machine to the first shaft, i.e. also increase the effect of the inertia upon the first shaft.